package com.example.demo.bean;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.enums.BooleanEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.usermodel.Font;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ColumnWidth(10)
@HeadRowHeight(20)
@HeadFontStyle(color = Font.COLOR_RED, bold = BooleanEnum.TRUE)
public class Menutemplet {

//    @ExcelIgnore
    @ExcelProperty("序号")
    private int id;

    @ExcelProperty({"一级目录","主键ID"})
    private int perm_id;

    @ExcelProperty({"一级目录","名称"})
    @ColumnWidth(20)
    private String perm_name;

    @ExcelProperty({"二级目录","级别"})
    private int perm_level;

    @ExcelProperty({"二级目录","上级ID"})
    private int up_perm_id;

    @ExcelProperty({"二级目录","时间"})
    @DateTimeFormat(value = "yyyy-MM-dd hh:mm:ss.sss")
    @ColumnWidth(30)
    private Date time;

}
